package cpr.command;

import cpr.DefaultCommandHandler;
import cpr.Printer;
import cpr.data.HLVector;
import cpr.helper.ScoreHelper;

public class CmdScore extends DefaultCommandHandler {
	public CmdScore() {
		super("score");
	}
	public void execute(String[] params) throws Exception {
		ScoreHelper helper = getCommandContext().getContext().getScoreHelper();
		int score = helper.convertStringToScore(getParameter(params, 1,"0"));
		
		HLVector vector = new HLVector(score);
		String asArr = helper.printHLVectorAsArray(vector);
		Printer.println("score: "+vector.score+" = "+asArr);
			
	}
}
